package day4;

import java.util.Scanner;

public class Point {
	private int x;
	private int y;
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	
	public Point() {
		System.out.println("point1初始坐标为(" + x + "," + y +")");
	}
	public Point(int x, int y) {
		this.x = x;
		this.y = y;
		System.out.println("point2初始坐标为(" + x + "," + y +")");
	}
	
	public void movePoint(int dx, int dy) {
		x = x + dx;
		y = y + dy;
		System.out.println("移动后坐标为(" + x + "," + y +")");
	}
}
